The examples are part of LabWINDOWS/CVI, I will only share relevant code, of course it's a good idea considering CVI if you're making these kind of applications regularly.
Part of the start function in C:
int error=0;
char chan[256];
char clockSource[256];
uInt32 initialCount;
uInt32 countDirection,edge;
float64 rate;
char errBuff[2048]={'\0'};
/*********************************************/
// DAQmx Configure Code
/*********************************************/
SetWaitCursor(1);
DAQmxErrChk (DAQmxCreateTask("",&gTaskHandle));
DAQmxErrChk (DAQmxCreateCICountEdgesChan(gTaskHandle,chan,"",edge,initialCount,countDirection));
DAQmxErrChk (DAQmxCfgSampClkTiming(gTaskHandle,clockSource,rate,DAQmx_Val_Rising,DAQmx_Val_ContSamps,gSamplesToRead));
DAQmxErrChk (DAQmxRegisterDoneEvent(gTaskHandle,0,DoneCallback,NULL));
/*********************************************/
// DAQmx Start Code
/*********************************************/
DAQmxErrChk (DAQmxStartTask(gTaskHandle));
Fetching the counters value:
int32 error=0;
int32 numRead;
/*********************************************/
// DAQmx Read Code
/*********************************************/
DAQmxErrChk(DAQmxReadCounterU32(gTaskHandle,gSamplesToRead,10.0,gData,gSamplesToRead,&numRead,0));
With this code and the way of transforming this to PyDAQmx as explained on https://pythonhosted.org/PyDAQmx/usage.html you should be able to get a working program.
Please inform me if you get something working. Maybe it's also a good idea to contact de developers of PyDAQmx.