Made a method to count the number of rows that contain a value