Understanding D flip flop function - what this thing does
Provocative question: have you tried googling for Flip-flop D counter? I found this.

The trick is that if you feed back the inverted output of the flip flop to the input, you get a circuit that divides the clock frequency by two.

The principle is not that hard to grasp. The flip flop D replicates the D input to the output Q when the clock rises. The inverted output is the opposite: if you connect it to the input, at every clock cycle the input will get inverted, and thus the output. This happens at every rising edge, so every two clock edges (rising and falling) you have one output edge (rising or falling). 

Cascading three flip flops and taking their outputs as the three bits of the value, you get a base-8 counter. You can see that from the truth table: Q0 changes at every count, Q1 every two and so forth.

It's hard (impossible?) to describe the behavior with just truth tables, but basically D0=Q0', D1=Q1' and D2=Q2'. Then, CLK1=Q0 and CLK2=Q1.