Mahoro's circling birdies in Mahoromatic apparently are real, as they can be seen by other characters.
Although they appear when she's asleep, and continually multiply until she wakes up, leading to some... awkward situations when Suguru decides to observe her when she's dozing off.
That may have been SUGURU''s dream, as he was asleep at the time.
At one point in the second season, Mahoro's birdies are seen to re-enter her head when she wakes up. Only five this time, though.
Near the end of the manga, it is explained that Matthew (actually named "Arcadia Matthew Faye Ray") is an artificial intelligence, the birdies are part of her "sleep program", and that Mahoro was patterned after Matthew and/or the creator of Matthew, "Mahoro Matthew Faye Ray").
In the first episode of Best Student Council, Rino gets afflicted with these, combined with Non Sequitur Thud, when Kaori bumps into her. Later in the episode, Kaori sees birds when she hits her head on a tree. This time they stay until the end of the episode.
The manga of Soul Eater has Crona seeing stars after a good bash to the head from Stein's foot. He/she even says "Uwaa— I can see stars... but I can't figure out how to play with them~"
The Pokémon anime sometimes features characters seeing circling bird-like Pokémon such as Pidgey or Torchic. Often, it indicates when a Pokémon is succumbing to the effect of the Confusion status. There is also a low chance of circling stars.
This page explains the Confusion status in the anime in which it explains what happens when a Pokémon becomes Confused.
Also, the Ditto at the beginning of Pikachu's Ghost Carnival, in which the Ditto gets circling stars when it got hit on the head by a Cubone while Ditto was disguised as a Cubone.
Happened earlier than that in the TV series, in Urd's debut episode. When Keiichi gets medicine for Belldandy, he gets a bonus "instructional video" from the pharmacist (Urd in disguise). When Urd leans in for a kiss, an intrigued Keiichi follows suit, and Urd somehow accidentally knees him in the chin, resulting in the Trope for Keiichi.
Seen a few times in Nadia: The Secret of Blue Water, both the stars and birdies variants. In the episode where Jean gets into a Mushroom Samba after eating mushrooms, Marie knocks him out with his own encyclopedia, and he keeps the Circling Birdies for a long time afterward, even commenting on seeing them.
During one scene of Sonic the Hedgehog: The Movie, after Metal Robotnik crashes into the sea, Robotnik explains about his plans. However, when he mentions that Sonic "will have to fight something far more evil than Metal Robotnik," Sara hits Robotnik on the head, and stars circle Robotnik's head. This video has the entire scene.
Pokémon Special had this trope sometimes. For example, in Yellow, Agatha's Gengar gets these when it gets hit by Dizzy Punch. Meanwhile, in Diamond and Pearl, Roark's Craindos sees circling Torchic after becoming confused by a Water Pulse attack. In a later chapter, Diamond's Lickilicky (nicknamed Kit) sees circling Torchic after Sebastian's two Chinchou confuse him with Water Pulse after Sebastian stripped Kit from his Own Tempo with Weepinbell's Gastro Acid.
In Pokémon special episode Big Meowth, Little Dreams, Meowth has circling Pikachus when he lands after being blasted off.
One episode of Naruto has Rock Lee seeing little Sakuras dancing around his head after being hit by her; they then stop to pretend to flirt with him before they all punch him again.
In episode 7 of Kotoura-san, this happens to Hiyori, after she bangs her head against the wall a few times to get rid of thoughts about Manabe and Haruka she doesn't want to have.note She has a crush with Manabe, but became the Hopeless Suitor and had a case of I Want My Beloved to Be Happy at this point. At that scene, she was reminded Manabe is her crush.
Happens to Chi in Chi's Sweet Home during Chapter 45 (or near the end of Episode 91 in the anime) after Juri is a little too rough with petting Chi (which is by shaking Chi's face). Which of course is different in the anime, where Chi sees circling hearts.