score:2
I can think of two instances that fit your description well enough, both during WWI. Bulgaria and Italy. Both countries declared themselves neutral. Both countries were courted by both sides to join in. Both eventually did, though they did so with a declaration of war just before attacking.
Italy did it twice. First by denying to enter the war on the side of the Central Powers, and then by entering the war a year later on the side of the Allies.
Despite being a member of the Triple Alliance with Germany and Austria-Hungary, Italy declared themselves neutral saying the alliance only applied to defensive wars. Both sides campaigned hard to get Italy to join and open another front against France or Austria-Hungary. Italy wanted chunks of Austrian territory that Austria was not willing to give, so the Allies offered it to them in victory in a secret agreement, the 1915 Treaty of London.
Italy declared war on May 23, 1915 and attacked the next day.
The Great War has a nice video on Italy in WWI.
After fighting the First and Second Balkan Wars, Bulgaria had a bone to pick with its neighbors. Yet it declared itself neutral when war broke out as it was thought this would be a quick regional war. Like Italy, Bulgaria had a secret mutual defense treaty with the Ottoman Empire. And, like Italy, when the Ottomans entered the war Bulgaria refused to join.
After Austria experienced a series of humiliating defeats against Serbia, the Central Powers became interested in bringing Bulgaria into the fight both for their army, but also to open a land route to supply the Ottomans. The Allies also tried to bring Bulgaria in the war to help defend the Serbians and attack the Ottomans. But only the Central Powers were willing and able to give the Bulgarians the territory they wanted, which was in Allied countries. The Bulgarians waited.
On Sept 6th, 1915, Bulgaria and the Central Powers signed an alliance. A secret portion outlined all the portions of Bulgaria's neighbors Bulgaria would get were they attacked, plus guarantees for loans. Finally, a portion of the Bulgarian army was placed directly under German control of Generalfeldmarschall August von Mackensen.
On Sept 22nd the Bulgarians mobilized, but covered it up by stating this was "armed neutrality" to defend its borders. On October 6th a German and Austrian army once again attacked Serbia from the north. Once it was clear this offensive was going well, a now well-prepared Bulgaria declared war on the 14th and invaded Serbia from the east.
The Great War has a nice video on Bulgaria in WWI.