updated countGender function to use "where" statement
redid fib from memory