Q:

SQL Server - Conditionally Increment a Counter

What I'm looking to do is create grouped sequences for continuous date ranges. Take the following sample data:
Person|BeginDate |EndDate
A     |1/1/2015  |1/31/2015
A     |2/1/2015  |2/28/2015
A     |4/1/2015  |4/30/2015
A     |5/1/2015  |5/31/2015
B     |1/1/2015  |1/30/2015
B     |8/1/2015  |8/30/2015
B     |9/1/2015  |9/30/2015

If BeginDate in the current row is >1 day from the EndDate in the previous row then increment the counter by 1, otherwise assign the counter's current value. The sequencing would look like :
Person|BeginDate |EndDate  |Sequence
A     |1/1/2015  |1/31/2015|1
A     |2/1/2015  |2/28/2015|1
A     |4/1/2015  |4/30/2015|2
A     |5/1/2015  |5/31/2015|2
B     |1/1/2015  |1/30/2015|1
B     |8/1/2015  |8/30/2015|2
B     |9/1/2015  |9/30/2015|2

Partitioned and reset for each person.
For your testing :
 CREATE TABLE ##SequencingTest(
 Person char(1)
,BeginDate date
,EndDate date)

INSERT INTO ##SequencingTest
VALUES
('A','1/1/2015','1/31/2015')
,('A','2/1/2015','2/28/2015')
,('A','4/1/2015','4/30/2015')
,('A','5/1/2015','5/31/2015')
,('B','1/1/2015','1/30/2015')
,('B','8/15/2015','8/31/2015')
,('B','9/1/2015','9/30/2015')

A:

You can do this with lag() and then a cumulative sum:
select t.*,
       sum(flag) over (partition by person order by begindate) as sequence
from (select t.*,
             (case when datediff(day, lag(endDate) over (partition by person order by begindate), begindate) < 2
                   then 0
                   else 1
              end) as flag
      from t
     ) t;

