datalogger for counter sensor with RTC HELP!

i hope it will be more understandable.

I'm sorry, but in my opinion, you have a ways to go.

int ActualStateofCounterA = 0;         // state of the button (Either HIGH or LOW)

Nowhere in this name is there a clue that it is a switch state. Counter is not a switch. Names like currStateA, currStateB, prevStateA, and prevStateB give a much clearer picture.

int CurrentNumberofBeesA = 0;   // counter for the number of button presses

Just out of curiosity, how do you get the bees to press the switches? It seems unlikely that they do, so it seems unlikely that you are using pushbutton switches. The names of variables, and the comments should reflect the kind of hardware actually used.

long lastEvent= 0; // The last time a bee has entered the feeding station

Last event of what kind? Details are important. Reading the comments is useful, but 300 lines later in the code, I won't remember what kind of event this is supposed to be. lastBeeFeeding or lastEventLogged would tell me, without the need for comments, exactly what last event.