Will people know I committed a crime when knocking them out?
Solution 1:
I worked on my pickpocketing skill yesterday on a room with two sleeping people. I had a save state so I can reload if I got caught so I had some chances to play around.
When both are asleep and I would commit a crime with no sound, regardless if I knocked them out or not, they would not detect a crime.
If I would Commit a crime that made a sound, such as unlocking a chest (even if succesfull), they would wake up and enter a search state. If I would wait around for them to find me, then I would get the indicator that I've commited a crime. If I would have ran away they would eventually go back to sleep.
On one of my save states, I got caught pickpocketing by a sleeping person, the crime indicator came up, and I proceeded to knock her out. The other person was still asleep and remained so for the rest of the encounter. Knocking out the woman who caught me did not remove the bounty I had.
As long as you won't be detcted, go ahead and do as many crimes as you can, if your stealth is not good enough, go ahead and knock them out and you won't get a bounty placed. Just rememeber that people wake up and can catch you mid crime.
Solution 2:
Since this game is relatively new (Came out Feb 13 2018) there isn't a hard wiki or many people that can prove my answer, but this is just what I have came up with after reading some Reddit posts and forum posts.
-NPCs that are in your room while (or during the aftermath) of a crime will report it to a guard and get you caught. If a NPC is sleeping they can report you (although there is some controversy over this)
-Some players have said that other NPCs that are sleeping can get you caught when you knockout other sleeping NPCs.
-If you knockout people that are sleeping in stealth mode, (to my personal experience) I have never gotten caught yet but some people on Reddit claims that it is possilble.
All I can say is wait for more new information to come out, what I'm saying is that since this game is so new, to my personal experience and the current information out there, this is what I have determined to be the case.