Removed unused global count varaible.