public long getTransactionCount(final Address address, final Hash blockHash) {
    return getAndMapWorldState(
            blockHash, worldState -> Optional.ofNullable(worldState.get(address)))
        .map(Account::getNonce)
        .orElse(0L);
  }
Returns the number of transactions sent from the given address in the block at the given hash.

@param address The address whose sent transactions we want to count.
@param blockHash The hash of the block being queried.
@return The number of transactions sent from the given address.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/query/BlockchainQueries.java