Let's get the obvious stuff out of the way. We've got a young main character (Annemarie is ten years old); straightforward, plain language; and a topic (saving your best friend from danger) that's aimed at a young adult audience. Number the Stars has also won the Newbery award, which is only given out to books in the children's literature genre. And, oh yeah, a very reputable children's lit author wrote it. So, children's literature? Check.
Number the Stars also qualifies as historical fiction and war drama because, well, it's set in 1940s Denmark during the middle of World War II. But just because a book is set in a specific time period, we can't go ahead and call it historical fiction. What makes it fit that genre is that fictional people, like Annemarie, Ellen, and their families, experience events that nonfictionally happened to people (i.e. Nazi occupation of Denmark).
And this story doesn't just resemble a general time in history. It's actually based on what happened to a real-life Resistance fighter named Kim Malthe-Bruun (Peter's nonfiction counterpart). In the story, we're really impressed by Peter's bravery and really sad about his death, right? Well it's even more impressive and even sadder knowing that it all happened to a real young man.
The events of this real-life war also dictate what happens to the characters. That means that because Lowry set the story in Denmark in the 1940s, the characters have to experience whatever was going on in Denmark in the 1940s (funny how that works, huh?). She kind of wrote herself into a corner there—a fascinating corner, but a corner nonetheless. Even small elements of the characters' lives (like Kirsti not being able to get shoes made of real leather) are influenced by real wartime situations.
So remember, historical fiction isn't just about books called A Lady of the Court with a picture of Fabio in Medieval garb on the cover. There's some good stuff out there.