How is unlawful presence calculated after I-485 denial?

I'm not sure if you say that to mean if I'm expecting to be denied because I know I am not a passable candidate or something, but I'm just trying to prepare for the worse.

I'm really confused about what's allowed or not, and I'm worried that I may have already violated some things so far. I'd like to figure out if I have in fact done anything wrong or not, as well as figure out what I should do in the event that my I-485 is denied in order to prevent any other infractions.

Based on my interpretation of the information I've found, I think I might have to take actions even before receiving a verdict on my case, but I'm not sure about this and I'm trying to see if anybody can clarify.

/r/USCIS Thread Parent