Solution 1:
Please check the mysql version. This bug exists in 5.6.* and is solved in 5.6.11 release. Verify that your server has version different from [5.6.* < 5.6.11] to make this work.
This is a bug posted in mysql [not in mariadb] here:
http://bugs.mysql.com/bug.php?id=68458.
If you have verified the version of mysql, then check below explanation:
NOTE: It is mentioned in the bug link that "MySQL server compiled from "5.6.11-log Source distribution" still has this bug."
Solution 2:
found_rows() and limit in the same query will not result in total count but will give count for data with limit.
If there is a limit in the select query, you will have to use
"select SQL_CALC_FOUND_ROWS, ....... limit x;"
and immediately next execute
"select found_rows();"
OR
If there is no limit in the select statement then you can directly execute
"select found_rows(), .......;"
Explanation here: https://dev.mysql.com/doc/refman/5.7/en/information-functions.html#function_found-rows