Releasing a player WILL count against your cap.
The penalty amount will be 50% of the player's salary. The penalty will count against your salary cap for however many years are remaining on that player's contract.
EXAMPLE: Houston releases a player with a 2 year 4 points a year contract. Houston will have a penalty of 2 points (50% of the points) for 2 seasons (the life of the contract).
If the amount per season is odd it will result in a .5. So if it was 3 points per season you would get a 1.5 penalty, but YOU ALWAYS ROUND UP!!!! So your hit now becomes 2 points per season.