MDL-44349 core_moodlelib: Remove right single quotes before counting

Signed-off-by: Tony Butler <tonyjbutler@gmail.com>