Fixed bug in pl/pgSQL function get_count_of_dossiers