Length of stay for H1B holders

My petition is valid from Oct 2013 - Aug 2016. If i travel by July 2014, will my 3 yrs starts counted from July 2014(time when i enters US) or the 3 yrs count will be my petition validity start date Oct 2013.

Please let me know on this.

Your 3 year clock starts the day you enter USA. So, your 3 years clock starts from July 2014.