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

# Count by group

> The **Count by group** step counts the number of rows that exist for each unique value or combination of values in one or more columns. This step is similar to the COUNTIF function in Excel.

Watch this [Parabola University](https://parabola.io/resources/parabola-university) video for a quick walkthrough of the **Count by group** step.

<Frame>
  <iframe src="https://www.youtube.com/embed/_FE9mivdFSw" title="How to count by group" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen />
</Frame>

## Input/output

Our input data is a list of ecommerce orders, including detailed data about items ordered.

<Frame>
  <img src="https://mintcdn.com/parabola-7119dfb0/T25np0t98ZhrB8ru/images/transforms/image-28.png?fit=max&auto=format&n=T25np0t98ZhrB8ru&q=85&s=f6780b23580bce73460d43dd6f0b8b79" alt="Input data showing a list of ecommerce orders with detailed item-level data" width="1810" height="1262" data-path="images/transforms/image-28.png" />
</Frame>

We want to know how many of each SKU was sold. With the step set up and data flowing through it, we can see that we our most popular item was SKU #1586082 with 11 items sold.

<Frame>
  <img src="https://mintcdn.com/parabola-7119dfb0/T25np0t98ZhrB8ru/images/transforms/image-29.png?fit=max&auto=format&n=T25np0t98ZhrB8ru&q=85&s=d9a8009e9b80b07d32e46f9619e43533" alt="Output data showing each SKU with its count of items sold, with SKU #1586082 at 11" width="416" height="968" data-path="images/transforms/image-29.png" />
</Frame>

## Default settings

By default, this step will count every row as unique and display a 'Count' column with the same value as the number of rows in your input table.

<Frame>
  <img src="https://mintcdn.com/parabola-7119dfb0/55xSH1bSQs7FexjG/images/transforms/image-30.png?fit=max&auto=format&n=55xSH1bSQs7FexjG&q=85&s=9a72476c591d2b33defe963a2a886827" alt="Default settings panel showing every row counted as unique with a Count column matching the input row count" width="705" height="313" data-path="images/transforms/image-30.png" />
</Frame>

## Custom settings

To customize these default settings, you'll first select a column or multiple columns you'd like to count unique values in. Then, you'll title your new counting column.

Above, we wanted to count groups in a single column, so we selected 'SKU' from the dropdown and named the new column 'Count'. You can also add multiple columns if you want to count unique values for the combinations of those column values.

For example, if we want to count sizes sold of each item type, we can select 'Product Title' and 'Variant Title 2' (item sizes) from the dropdown to see these updated results. The results below show us that we sold significantly more small than medium women's athleisure tops.

<Frame>
  <img src="https://mintcdn.com/parabola-7119dfb0/55xSH1bSQs7FexjG/images/transforms/image-31.png?fit=max&auto=format&n=55xSH1bSQs7FexjG&q=85&s=7171f2acf62af23ba51b0b52448cbb02" alt="Custom settings results grouping by Product Title and Variant Title 2 to show item-size sales counts" width="1108" height="822" data-path="images/transforms/image-31.png" />
</Frame>

## Related steps

* [Sum by group](/product/transform/sum-by-group)
* [Average by group](/product/transform/average-by-group)
* [Find maximum by group](/product/transform/find-maximum-by-group)
* [Merge duplicate rows](/product/transform/merge-duplicate-rows)
* [Remove duplicate rows](/product/transform/remove-duplicate-rows)
