I am tryimg to count the number of rows returned from a mysql query using the code below. I cannot get the count despite trying many things. Could the problem be distinct vales. Here is my query
SELECT DISTINCT SUBSTRING_INDEX(location,'>',-2), count(*) as location FROM tablename