Count checked cells if cell on same row matches state in Numbers
You need the COUNTIFS() function.

So in this case:

=COUNTIFS («gun range», true, «Firearm», "Pistol")

Accounting for ; delimiters:

=COUNTIFS («gun range»; true; «Firearm»; "Pistol")



From the help:


  The COUNTIFS function returns the number of cells in one or more
  collections that satisfy given conditions (one condition per
  collection).
  
  COUNTIFS(test-values, condition, test-values…, condition…)
  
  test-values: A collection containing values to be tested. test-values can contain any value.
  
  condition: An expression that can include comparison operators, constants, the ampersand concatenation operator, and references. The
  contents of the condition must be such that the result of comparing
  the condition to another value results in the boolean value of TRUE or
  FALSE.
  
  test-values…: Optionally include one or more additional collections containing values to be tested. Each test-values collection must be
  followed immediately by a condition expression. This pattern of
  test-values, condition can be repeated as many times as needed.
  
  condition…: If an optional collection of test-values is included, an additional expression that results in a boolean TRUE or FALSE. There
  must be one condition expression following each test-values
  collection; therefore, this function will always have an odd number of
  arguments.
  
  Notes
  
  Each value in test-values is compared to the corresponding condition.
  If the corresponding values in each collection meet the corresponding
  conditional tests, the count is increased by 1.