There is not this story of xx seconds of copyrighted music.
You are probably talking about fair use. If that’s the case, there is not a clear number of time.
And if your game is monetized fair use won’t be a good excuse since it is basically for educational or informational purpose.
The point is, on youtube the media companies use to allow small pieces of content - x% of the video or x seconds, but if the owner wants it can flag just one second, or even one frame alone.
But answering your question, it is very unlikely a simple music on your game will call the atention of the powerful music industry. If you want to make it under the law, use royalty free musics or buy the license to use it in your project. But in an app it will probably cost hundreds or more.