how can I count by week, month, and YTD with postgres?
Too long for a comment now: I don't speak PGSQL so try adapting the following for your date extraction functions:

SELECT
     MAX(CurrentWeekCount) As CurrentWeekCount
    ,MAX(CurrentMonthCount) As CurrentMonthCount
    ,MAX(AllCount) As AllCount
FROM
(



  count all the records by the current week


    SELECT
     COUNT(CustomerID) As CurrentWeekCount
    ,NULL As CurrentMonthCount
    ,NULL As AllCount
    FROM YourTable
    WHERE DATEPART(week, YourDateColumn) = DATEPART(week, GETDATE())

    UNION ALL



  month


SELECT
     NULL As CurrentWeekCount
    ,COUNT(CustomerID) As CurrentMonthCount
    ,NULL As AllCount
    FROM YourTable
    WHERE DATEPART(month, YourDateColumn) = DATEPART(month, GETDATE())

    UNION ALL



  all of time


    SELECT
     NULL As CurrentWeekCount
    ,NULL As CurrentMonthCount
    ,COUNT(CustomerID) As AllCount
    FROM YourTable
) x