New function for counting response elements