# Counting transactions

**URL:** <https://community.bitquery.io/t/counting-transactions/367>\
**Category:** GraphQL API\
**Tags:** closed\
**Created:** [July 31, 2021, 1:19pm UTC](https://community.bitquery.io/t/counting-transactions/367 "2021-07-31T13:19:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chuacw](https://avatars.discourse-cdn.com/v4/letter/c/d9b06d/32.png) [@chuacw](https://community.bitquery.io/u/chuacw)\
**Post date:** [July 31, 2021, 1:19pm UTC](https://community.bitquery.io/t/counting-transactions/367/1 "2021-07-31T13:19:46Z")

</div>

I have the following query:

```auto
query CallsToSmartContractAddressByCallerInAscendingTimestamp($caller: String, $smartContractAddress: String) {
  ethereum {
    smartContractCalls(
      caller: {is: $caller}
      options: {asc: "block.timestamp.iso8601", limit: 10}
      smartContractAddress: {is: $smartContractAddress}
    ) {
      block {
        timestamp {
          iso8601
        }
      }
      transaction {
        hash
        gasValue
      }
      smartContractMethod {
        name
      }
    }
    transactions {
      count
    }
  }
}

```

When called with the following variables,

```auto
{
  "caller": "0x1805a813C8943a1C2C78b3C7400C30005C9887B2",
  "smartContractAddress": "0xEFb47D73181bB6963c8113A58184525355287573"
}

```

The transaction count should return 10, but I’m getting 1228669333 in count.

How should I alter the query so that it returns a count of 10, since I’ve limited the query to 10 responses? If I remove the limit option, would the count actually count the number of responses returned, instead of the number of transactions it processes?

---

<div class="post-metadata">

**Author:** ![sayon](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@sayon](https://community.bitquery.io/u/sayon)\
**Post date:** [August 3, 2021, 6:37pm UTC](https://community.bitquery.io/t/counting-transactions/367/2 "2021-08-03T18:37:45Z")

</div>

If the **limit** is removed, it still shows the total transaction counts and not the number of responses. However, you can add an extra parameter and filter to your query if you want to see 10 as the limit of trades or simply the number of trades returned by the query through

```auto
query CallsToSmartContractAddressByCallerInAscendingTimestamp($caller: String, $smartContractAddress: String, $limit: Int) {
  ethereum {
    smartContractCalls(
      caller: {is: $caller}
      options: {asc: "block.timestamp.iso8601", limit: $limit}
      smartContractAddress: {is: $smartContractAddress}
    ) { 
      
      block {
        
        timestamp {
          iso8601
        }
      }
      transaction {
        hash
        
        gasValue
      }
      smartContractMethod {
        name
        
      }
    }
    transactions {
      count
      index(txIndex: {is: $limit})
    }
  }
}

```

Adding an extra variable

```auto
{
  "limit": 10,
  "caller": "0x1805a813C8943a1C2C78b3C7400C30005C9887B2",
  "smartContractAddress": "0xEFb47D73181bB6963c8113A58184525355287573"
}

```
