The library is having a book sale. Hardcover books sell for $4 each, and paperback books are $2 each. If Connie spends $26 for 8 books, how many hardcover books did she buy?