I've solved the problem.
The table associated to my module had not the course field so moodle couldn't count how many instances was with the next command:
"$count = count_records_select("$module->name",'course<>0');"
(directorymoodle/admin/modules.php)
Blocks
How can I know who is using a specific module?
This discussion has been locked so you can no longer reply to it.