> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt
> Use this file to discover all available pages before exploring further.

# RS_CountValue

Returns count of a particular value from a spectral band in a raster image

## Signatures

```sql theme={"system"}
RS_CountValue (Band1: ARRAY[Double], Target: Double)
```

## Parameters

<ParamField body="Band1" type="ARRAY[Double]" required>
  The first spectral band.
</ParamField>

<ParamField body="Target" type="Double" required>
  The target value.
</ParamField>

## Return type

<ResponseField type="Integer">
  An integer value.
</ResponseField>

## Example

```scala theme={"system"}
val countDF = spark.sql("select RS_CountValue(band1, target) as count from dataframe")
```
