Add debugging variable textures_count to track textures number