add count function to quotes