Fix for count in directive