Implement a function count_open_tweets(N, K, clicks) which tracks the state of tweets and determines how many tweets are currently open after a series of click events. The function should handle individual tweet open/close actions as well as a command to close all tweets simultaneously.
Input/Output Requirements
Input:
N (int): The total number of tweets (1-indexed). (1 ≤ N ≤ 100)
K (int): The number of click events (1 ≤ K ≤ 100).
clicks (list of strings): Each string represents a command to either toggle a specific tweet or close all tweets. The commands will be either:
"CLOSEALL": This command closes all currently open tweets.
"CLICK X": This command opens tweet number X if it is currently closed, or closes it if it is currently open.
Output:
A list of integers where each integer represents the number of currently open tweets after each click event is processed.
Your implementation should be placed in the file named /app/solution.py. Ensure that the function adheres to the provided signature and correctly implements the specified functionality.