Does apps backup on iCloud consume space? iCloud comes with free 5GB space. If I enable iCloud to backup my iPhone app (10GB+), is the app size counted as part of the 5GB space? Or only the data of apps is counted?
Anything on your iPhone that Apple sells in its stores (that is, any music, apps, movies, books, etc. you've purchased and are still available) will be backed up and won't count towards the 5GB total.

That doesn't include, obviously, app data, your photos and videos, SMS and the like (from iCloud: Backup and restore overview):


  What is backed up
  
  You get unlimited free storage for:
  
  
  Purchased music, movies, TV shows, apps, and books
  
  (...)
  
  
  You get 5 GB of free iCloud storage for:
  
  
  Photos and videos in the Camera Roll
  Device settings (for example: Phone Favorites, Wallpaper, and Mail, Contacts, Calendar accounts)
  App data
  Home screen and app organization
  Messages (iMessage, SMS, and MMS)
  Ringtones
  Visual Voicemails
  


There are some caveats to consider when using iCloud Backup, though:


as already mentioned, purchases no longer available in the iTunes Store, App Store or iBookstore may not be restored
backup of purchased music is not available in all countries
backups of purchased movies and TV shows are U.S. only
music, movies, and TV shows that you did not purchase from the iTunes Store are not included
any podcasts, audio books or photos that you originally synced from your computer are excluded


I warmly recommend that you read Choosing an iOS backup method (Should I use iTunes or iCloud to back up my iOS device?) for more information on iTunes and iCloud backups and which may the right choice for you.

If the size of your backup exceeds the 5 GB free storage limit, an alternative to purchasing additional storage is to restrict which app data will be backed up. You can do that in Settings > iCloud > Storage &amp; Backup > Manage Storage.